package com.zf.shuashua.ui.popup;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;

import androidx.annotation.NonNull;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.resource.bitmap.CircleCrop;
import com.bumptech.glide.request.RequestOptions;
import com.lxj.xpopup.core.CenterPopupView;
import com.zf.shuashua.R;

/**
 * 开启通知奖励弹窗
 */
public class NetworkBGPopup extends CenterPopupView {
    private String imgurl;
    private ImageView img_backdrop;

    public NetworkBGPopup(@NonNull Context context, String imgurl) {
        super(context);
        this.imgurl = imgurl;
    }

    @Override
    protected int getImplLayoutId() {
        return R.layout.pupop_network_bg;
    }

    @Override
    protected void onCreate() {
        super.onCreate();
        img_backdrop = findViewById(R.id.img_backdrop);
        findViewById(R.id.img_close).setOnClickListener(view -> dismiss());
        Glide.with(this).load(imgurl)
                .into(img_backdrop);

    }

}

